export function getOrderStatus(status: number) {
  const statusText = [
    '核查中',
    '核查超时',
    '异常订单',
    '异常锁单',
    '异常锁单',
    '手动取消',
    '已完成',
    '已结束',
    '系统强补',
    '超时处罚',
    '系统取消',
    '已完成'
  ]
  return statusText[status]
}

export function getOrderColor(status: number) {
  let color = {
    color: '',
    backgroundColor: ''
  }
  switch (status) {
    case 9:
      color = {
        color: 'orange',
        backgroundColor: '#B4140B'
      }
      break
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 8:
    case 10:
      color = {
        color: '#ffffff',
        backgroundColor: '#B4140B'
      }
      break
    case 6:
      color = {
        color: '#0576b2',
        backgroundColor: '#dbf0fb'
      }
      break
    default:
      color = {
        color: '#0576b2',
        backgroundColor: '#dbf0fb'
      }
  }
  return color
}

export function getWithdrawalColor(status: string | number) {
  switch (status) {
    case '0':
      return {
        color: '#d13d54',
        backgroundColor: '#fff1f0'
      }
    case '1':
      return {
        color: '#246bde',
        backgroundColor: '#e6f4ff'
      }
    case '2':
      return {
        color: '#3b9f10',
        backgroundColor: '#f6ffed'
      }
    case '3':
      return {
        color: '#d46c09',
        backgroundColor: '#fff7e6'
      }
    case '4':
      return {
        color: '#1e1e1e',
        backgroundColor: '#fafafa'
      }
  }
}
